On-board diagnostics (OBD) is a vehicle's self-diagnostic and reporting system, which gives the vehicle owner or repair technician access to the status of the various vehicle sub-systems, e.g., transmission, airbags, antilock braking/ABS, cruise control, electric power steering, etc. OBD systems use a standardized digital communications port to provide real-time data in addition to a standardized series of diagnostic trouble codes (DTCs), which allow one to rapidly identify and remedy malfunctions within the vehicle.
The second generation of OBD standard, OBD-II, defines the type of diagnostic connector and its pinout, the electrical signaling protocols available, and the message format. The OBD-II standard provides a list of vehicle parameters to monitor along with how to encode the data for each parameter. The OBD-II standard also provides an extensible list of DTCs. As a result of this standardization, a single diagnostic device can query the on-board computer(s) in any vehicle that supports the OBD-II standard.
For example, the OBD-II standard provides access to data from the engine control unit (ECU) and offers valuable information when troubleshooting problems inside a vehicle. In particular, the OBD-II standard defines a method for requesting various diagnostic data and a list of standard parameters that might be available from the ECU. The various parameters that are available are addressed by parameter identification numbers (PIDs) defined in the OBD-II standard. The PID request and data retrieval system gives access to real-time performance data as well as flagged DTCs.
Controller area network (CAN) bus is a vehicle bus standard designed to allow microcontrollers and devices inside the vehicle to communicate with each other without a host computer. CAN bus is a message-based protocol designed specifically for automotive applications but also used in other areas such as aerospace, maritime, industrial automation and medical equipment.
The OBD-II port system can collect engine data, driver profiles, and other information useful for vehicle diagnostics, repair and maintenance. When a vehicle fails, the diagnostic device can access the error code defined by the OBD-II standard through which users can easily tell what is going on with their vehicles and their driving habits or profiles. In particular, CAN bus is used to interconnect different controllers like ECUs within the vehicle for data exchange with the diagnostic device. Since more and more vehicles are equipped with wireless communication capabilities (e.g., Wi-Fi, 2G, 3G, 4G or Bluetooth), mobile devices such as smartphones or tablet computers have been used for displaying the diagnostic information.
However, issues with OBD-II security becomes more and more serious since hackers may send malicious CAN message commands through the OBD-II port to vehicles via the wireless communication channels, trying to control the cars. For example, a hacker can send malicious CAN message commands into a car to control the brake or steering wheel while the car is driving. Therefore, it is important to find a way of detecting and preventing such auto attacks via the OBD-II port.